/*
 * To
 change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bomberman.model;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

/**
 *
 * @author Administrator
 */
public class Board extends TerminatableObject {
    public long getWidth() {
        return this.width;
    }

    public static long getMaxWidth() {
        return MAX_WIDTH;
    }

    public boolean canHaveAsWidth(long width) {
        return (0 <= width) && (width <= getMaxWidth());
    }

    private long width;

    private static long MAX_WIDTH = Long.MAX_VALUE;

    public long getHeight() {
        return this.height;
    }

    public static long getMaxHeight() {
        return MAX_HEIGHT;
    }

    public boolean canHaveAsHeight(long height) {
        return (0 <= height) && (height <= getMaxHeight());
    }

    private long height;

    private static long MAX_HEIGHT = Long.MAX_VALUE;

    public boolean canHaveAsPosition(Position pos)
            throws NullPointerException {
        if (! canHaveAsHeight(pos.getYCoord()))
            return false;
        if (! canHaveAsWidth(pos.getXCoord()))
            return false;
        return true;
    }

    public boolean canHaveAsElement(Element elm) {
        return false;
    }

    public boolean canHaveAsElementAt(Element elm, Position pos) {
        return false;
    }

    public boolean hasProperElements() {
        return false;
    }

    public boolean hasAsElement(Element elm) {
        return false;
    }

    public boolean hasAsElementAt(Element elm, Position pos) {
        return false;
    }

    public int getNbElements() {
        return 0;
    }

    public int getNbElementsAt(Position pos) {
        return 0;
    }

    public int getNbUsedPositions() {
        return 0;
    }

    public Iterator<Element> getElementsAt(Position pos) {
        return null;
    }

    public Iterator<Element> getElements() {
        return null;
    }

    public Iterator<Position> getUsedPositions() {
        return null;
    }

    public Position getPositionOf(Element elm) {
        return null;
    }

    public void addAsElement(Element elm) {

    }

    public void addAsElementAt(Element elm, Position pos) {

    }

    public void removeElement(Element elm) {

    }

    private Map<Position, Set<Element>> elements =
            new HashMap<Position, Set<Element>>();

    @Override
    public void terminate() {

    }
}
